package com.api.tiny.mirror.service.product.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.tiny.mirror.basic.common.json.deserializer.SplitToCollectionsDeserializer;
import com.tiny.mirror.basic.common.json.serializer.CollectionsJoinSerializer;
import com.tiny.mirror.basic.web.validation.annotation.CollectionVerify;
import java.util.List;
import lombok.Getter;
import lombok.Setter;

/**
 * @Author: liujsh
 * @Description:
 * @Date: Create in 2023/11/9
 */
@Getter
@Setter
public class GetAbilityRequest {

  // 包含的能力ids
  @JsonProperty(value = "ids")
  @CollectionVerify(nullable = false, min = 1, max = 200, omitEmptyElement = true)
  @JsonDeserialize(using = SplitToCollectionsDeserializer.class)
  @JsonSerialize(using = CollectionsJoinSerializer.class)
  private List<Long> ids;
}
